package com.xiaocg.combination;

/**
 * 菜单组件
 */
public abstract class MenuComponent {
    protected String name;
    protected Integer level;

    public void add(MenuComponent component){
        System.out.println("添加");
    }

    public void remove(MenuComponent component){
        System.out.println("添加");
    }

    public MenuComponent get(int index){
        throw new UnsupportedOperationException();
    }

    public String getName(){
        return name;
    }

    public void print(){

    }
}
